package service

import (
	"naio/config"
	"naio/constant"
	"naio/model"
)

type IUserService interface {
	LoginCodeAuth(code string) (string, int)
	DoWxUserPhoneSignature(userId int, sessionKey, encryptedData, iv string)
	DoUserAuthInfo(userId int, req constant.WxappAuthUserInfoRequest)
	DoAddVisitorRecord(userId int, ip string)
	QueryTodayUniqueVisitor() int
	QueryUserInfo(userId int) *model.UserModel
}

type UserService struct {
	Conf *config.BaseConfig
}

func NewUserService(conf *config.BaseConfig) IUserService {
	return &UserService{Conf: conf}
}

func (s *UserService) LoginCodeAuth(code string) (string, int) {
	return code,0
}

func (s *UserService) DoWxUserPhoneSignature(userId int, sessionKey, encryptedData, iv string) {

}

func (s *UserService) DoUserAuthInfo(userId int, req constant.WxappAuthUserInfoRequest) {

}

func (s *UserService) DoAddVisitorRecord(userId int, ip string){

}

func (s *UserService) QueryTodayUniqueVisitor() int {
	return 1
}

func (s *UserService) QueryUserInfo(userId int) *model.UserModel{
	r := &model.UserModel{}
	return r
}